<template>
  <div class="header">
    <div class="header-left">
      <div class="iconfont back-icon">&#xe624;</div>
    </div>
    <div class="header-input">
      <span class="iconfont">&#xe632;</span>
      输入游玩主题</div>
    <router-link to="/city">
      <div class="header-right">
        {{this.currentCity}}
        <span class="iconfont city-icon">&#xe625;</span>
      </div>
    </router-link>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'HomeHeader',
  computed: {
    ...mapState(['currentCity'])
  }
}
</script>

<style lang="stylus" scoped>
  @import "~styles/varibles.styl"
.header
  display :flex;
  line-height :.86rem;
  color: #fff;
  background: $bgcolor;
  .header-left
    float :left;
    width: .64rem;
    .back-icon
      text-align: center;
      font-size: .4rem;
  .header-input
    flex: 1;
    height :.64rem;
    line-height :.64rem;
    margin-top: .12rem;
    margin-left: .2rem;
    padding-left : .1rem;
    background: #fff;
    border-radius : .1rem;
    color: #ccc;
  .header-right
    color: #fff;
    float: right;
    min-width: 1.04rem;
    padding : 0 .1rem;
    text-align: center;
    .city-icon
      margin-left: -.04rem;
</style>
